<!-- expects a local variable "form" -->

<!-- put in all the information uploaded in hidden fields -->
<select name="work[author_attributes][ids][]" multiple="multiple" style="display:none;">
<%= options_from_collection_for_select(@allpseuds, :id, :name, @selected_pseuds) %>  
</select>
<select name="work[author_attributes][coauthors][]" multiple="multiple" style="display:none;">
<%= options_from_collection_for_select(@coauthors, :id, :name, @selected_pseuds) %>  
</select>
<%= form.hidden_field :title, :value => "#{@work.title}" %>
<%= form.hidden_field :summary, :value => "#{@work.summary}" %>
<%= form.hidden_field :notes, :value => "#{@work.notes}" %>
<% fields_for_associated('work', @chapter) do |c| %>
  <%= c.hidden_field :content, :value => "#{@chapter.content}" %>
  <%= c.hidden_field :title, :value => "#{@chapter.title}" %>
<%- end -%>
<%= form.hidden_field :expected_number_of_chapters, :value => "#{@work.expected_number_of_chapters}" %>
<%= form.hidden_field :parent_url, :value => "#{@work.url_for_parent}" %>
<%= form.hidden_field :restricted, :value => "#{@work.restricted}" %>
<%= form.hidden_field :published_at, :value => "#{@work.published_at}" %>
<%= form.hidden_field :revised_at, :value => "#{@work.revised_at}" %>